// 基于template/src/widgets/{{appEntities}}/{{ctrls@GRIDEXPBAR}}-grid-exp-bar/{{ctrls@GRIDEXPBAR}}-grid-exp-bar-model.ts.hbs生成
import { IGridExpBarModel } from "@/core";

//  获取部件模型
function getModel(): IGridExpBarModel {
  return {
    name: "gridexpbar",
    caption: "",
    codeName: "GridExpViewgridexpbar",
    cssName: "",
    controlType: "GRIDEXPBAR",
    showTitleBar: true,
    title: "我是标题",
		toolbarItems: getToolbarItems(),
    enableSearch: true,
    entityCodeName: 'IBIZOrder',      
    xDataCtrlName: 'gridexpbar_grid',
    quickSearchPlaceHolder: '订单名称,',
    xDataDeCodeName: 'ibizorder',
    xDataDeName: 'IBIZORDER',
    navPSDer: 'n_ibizorderdetails_eq',
    navFilter: 'ibizordername',
    navViewName: 'IBIZOrderDetailGridView9',
    navigateContext: { 'ctxparam2':'%orderstate%','ctxparam1':'xxx2' },
    navigateParams: { 'param2':'%ibizordername%','param1':'param3' },
  }
}

//  部件模型
export const model = getModel();

//  获取工具栏项
function getToolbarItems() {
  return [
    {
  		actionLevel: '100',
  		caption: '编辑',
  		captionLanResTag: 'TBB.TEXT.*.EDIT',
  		name: 'deuiaction3',
  		showCaption: true,
  		tooltip: '编辑',
  		tooltipLanResTag: 'TBB.TOOLTIP.*.EDIT',
  		itemType: 'DEUIACTION',
  		showIcon: true,
  		disabled: false,
  		cssName: '',
  		imagePath: '',
  		iconCls: 'fa fa-edit',
          imagePathX: '',
  		dataAccessAction: '',
  		noPrivDisplayMode: 2,
  		uiAction: {
  			codeName: 'Edit',
  			uIActionMode: 'SYS',
  			actionTarget: 'SINGLEKEY',
  			uIActionTag: 'Edit',
  			uIActionType: 'DEUIACTION'
  		},
  			logic: {
  				name: 'gridexpbar_toolbar_deuiaction3_click',
  				actionTag: 'Edit',
  				xDataCtrlName: 'gridexpbar_grid',
  				predefinedType: 'GRIDVIEW_EDITACTION'
  			}
    },
  ];
}
